package elec315.chatroom.server;

import elec315.chatroom.msg.BaseMsg;

public interface Publisher {

	/**
	 * Register observer to the publisher.
	 * 
	 * @param observer
	 *            The observer to register.
	 */
	public void registerObserver(Observer observer);

	/**
	 * Remove observer from the publisher.
	 * 
	 * @param observer
	 *            The observer to remove.
	 */
	public void removeObserver(Observer observer);

	/**
	 * Broadcast <code>BaseMsg</code> to all connected clients.
	 * 
	 * @param baseMsg
	 *            The baseMsg to broadcast.
	 */
	public void broadcastMessage(BaseMsg baseMsg);

}
